package cl.inmobiliaria.persistencia.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the cotformapago database table.
 * 
 */
@Embeddable
public class CotformapagoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idCotizacion;

	private byte idFormaPago;

	public CotformapagoPK() {
	}
	public int getIdCotizacion() {
		return this.idCotizacion;
	}
	public void setIdCotizacion(int idCotizacion) {
		this.idCotizacion = idCotizacion;
	}
	public byte getIdFormaPago() {
		return this.idFormaPago;
	}
	public void setIdFormaPago(byte idFormaPago) {
		this.idFormaPago = idFormaPago;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CotformapagoPK)) {
			return false;
		}
		CotformapagoPK castOther = (CotformapagoPK)other;
		return 
			(this.idCotizacion == castOther.idCotizacion)
			&& (this.idFormaPago == castOther.idFormaPago);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idCotizacion;
		hash = hash * prime + ((int) this.idFormaPago);
		
		return hash;
	}
}